{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "e95cef01",
   "metadata": {},
   "outputs": [],
   "source": [
    "from total_plot import plot_it\n",
    "import numpy as np\n",
    "\n",
    "x_labels = [20, 60, 100, 140, 180]\n",
    "idx_ratio = [10000/285, 10000/2655, 10000/7425, 10000/14595, 10000/24165]\n",
    "idx_ratio_1 = [1/190, 1/1770, 1/4950, 1/9730, 1/16110]\n",
    "optimal_ratio = [1.038659794,\n",
    "                 0.674498175,\n",
    "                 0.514712697,\n",
    "                 0.477159053,\n",
    "                 0.530361092]\n",
    "optimal_ratio_1 = [\n",
    "    0.781937017,\n",
    "    0.800817041,\n",
    "    0.811184689,\n",
    "    0.822793531,\n",
    "    0.867351885]\n",
    "swap_vals = np.array([\n",
    "    [1214/2, 0],\n",
    "    [13654/2, 0],\n",
    "    [55102/2, 0],\n",
    "    [127184/2, 0],\n",
    "    [257871/2, 0],\n",
    "])\n",
    "greedy_vals = np.array([\n",
    "    [440-190, 3132],\n",
    "    [4489-1770, 30706],\n",
    "    [17260-4950, 92102],\n",
    "    [38095-9730, 200977],\n",
    "    [73966-16110, 389267],\n",
    "])\n",
    "optimal_vals = np.array([\n",
    "    [440-190, 3132-190],\n",
    "    [4489-1770, 30206-1770],\n",
    "    [17260-4950, 90102-4950],\n",
    "    [38095-9730, 200977-9730],\n",
    "    [73966-16110, 389267-16110],\n",
    "])\n",
    "colors = ['#436691', '#f7d27d', '#da695c']  # 分别对应 swap, greedy, optimal 的颜色\n",
    "border_colors = ['#436691', '#f7d27d', '#da695c']  # 分别对应 swap, greedy, optimal 的颜色\n",
    "plot_it(swap_vals, greedy_vals, optimal_vals, idx_ratio_1, optimal_ratio, optimal_ratio_1, x_labels, colors, border_colors, 'fig/qubit_num_qaoa.pdf')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "xs",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
